<% layout('boilerplate') -%>
<link rel="stylesheet" href="/lib/swiper/css/swiper.min.css" />
<link rel="stylesheet" href="<%= linkPath %>/css/index.css" />
<link rel="stylesheet" href="<%= linkPath %>/css/main.css" />
<link rel="stylesheet" href="<%= linkPath %>/css/responsive.css" />
<link rel="stylesheet" href="<%= linkPath %>/css/test.css" />
<link rel="stylesheet" href="<%= linkPath %>/css/style.css" />

<script type="text/javascript" src="/lib/swiper/js/swiper.min.js"></script>
<script type="text/javascript" src="/lib/swiper/js/swiper.animate1.0.3.min.js"></script>
<script type="text/javascript" src="<%= linkPath %>/js/index.js"></script>

<!-- banner-swiper 首页banner-->
<div id="home" class="container-fluid">
    <div class="row">
        <div class="banner-swiper banner-swiper-container swiper-container">
            <div class="swiper-wrapper">
                <div class="swiper-slide">
                    <img style="width: 100%" src="<%= linkPath %>/images/banner1.jpg" alt="">
                </div>
                <div class="swiper-slide">
                    <img class="swiper-lazy" style="width: 100%" data-src="<%= linkPath %>/images/banner2.jpg" alt="">
                </div>
                <div class="swiper-slide">
                    <img class="swiper-lazy" style="width: 100%" data-src="<%= linkPath %>/images/banner3.jpg" alt="">
                </div>
                <div class="swiper-slide">
                    <a href="/testing" target="_blank">
                        <img class="swiper-lazy" style="width: 100%" data-src="<%= linkPath %>/images/banner4.jpg" alt="">
                    </a>
                </div>
            </div>
            <!-- Add Pagination -->
            <div class="banner-swiper-pagination swiper-pagination"></div>
        </div>
    </div>
</div>
<!-- banner-swiper -->
<!--服务方案-->
<div class="container-fluid service">
    <div class="container">
        <div class="row newsTitle">
            <h3>服务方案</h3>
            <div class="title-shadow">SERVICE CHARGE</div>
            <span></span>
        </div>
        <div class="row">
            <div class="col-sm-6 col-xs-12 service-object">
                <div class="objectBox servicer-o" style="background:url('<%= linkPath %>/images/service_objct.jpg') top center no-repeat;background-size: cover;">
                    <h1>服务对象</h1>
                    <p class="one">不孕不育&nbsp; &nbsp; 有生育困扰人士或其他原因的家庭</p>
                    <p class="tow">不孕不育、有生育困扰人士或者其他原因的家庭，提供一对一定制化服务以及试管专业咨询专业协调，圆夫妻家庭梦.</p>
                    <div class="arrBox"> &rarr;</div>
                </div>
            </div>
            <div class="col-sm-6 col-xs-12 service-object">
                <div class="objectBox servicer-process" style="background:url('<%= linkPath %>/images/service1.jpg') top center no-repeat;background-size: cover;">
                    <h1>项目流程</h1>
                    <p class="one">一站式服务&nbsp; &nbsp; 让您全程无忧</p>
                    <p class="tow">从前期咨询、签证、取卵、移植到第三方辅助生育、协助办理宝宝回国证件等一站式服务，让您全程无忧.</p>
                    <div class="arrBox"> &rarr;</div>
                </div>
            </div>
        </div>
    </div>
</div>
<!--服务方案-->
<!--数据部分-->
<div class="container section-data hidden-xs">
    <div class="row hidden-xs">
        <div class="dataItem wow bounceIn" data-wow-duration="1000ms" data-wow-delay="100ms">
            <img src="<%= linkPath %>/images/data1.png" alt="">
        </div>
        <div class="dataItem wow bounceIn" data-wow-duration="1000ms" data-wow-delay="100ms">
            <img src="<%= linkPath %>/images/data2.png" alt="">
        </div>
        <div class="dataItem wow bounceIn" data-wow-duration="1000ms" data-wow-delay="100ms">
            <img src="<%= linkPath %>/images/data3.png" alt="">
        </div>
        <div class="dataItem wow bounceIn" data-wow-duration="1000ms" data-wow-delay="100ms">
            <img src="<%= linkPath %>/images/data4.png" alt="">
        </div>
        <div class="dataItem wow bounceIn" data-wow-duration="1000ms" data-wow-delay="100ms">
            <img src="<%= linkPath %>/images/data5.png" alt="">
        </div>
    </div>
    <div class="row hidden-xs">
        <div class="dataItem wow bounceIn" data-wow-duration="1000ms" data-wow-delay="100ms">
            <span>300<i class="r-up">+</i> <i class="r-down">国际研究中心</i></span>
        </div>
        <div class="dataItem wow bounceIn" data-wow-duration="1000ms" data-wow-delay="100ms">
            <span>1000<i class="r-up">+</i> <i class="r-down">职业医生</i></span>
        </div>
        <div class="dataItem wow bounceIn" data-wow-duration="1000ms" data-wow-delay="100ms">
            <span>2000<i class="r-up">+</i> <i class="r-down">会员</i></span>
        </div>
        <div class="dataItem wow bounceIn" data-wow-duration="1000ms" data-wow-delay="100ms">
            <span>2000<i class="r-up">+</i> <i class="r-down">成功案例</i></span>
        </div>
        <div class="dataItem wow bounceIn" data-wow-duration="1000ms" data-wow-delay="100ms">
            <span>60%<i class="r-up">+</i> <i class="r-down">成功率</i></span>
        </div>
    </div>
    <!--<div class="dataItem wow bounceIn" data-wow-duration="1000ms" data-wow-delay="100ms">-->
        <!--<img src="<%= linkPath %>/images/data1.png" alt="">-->
    <!--</div>-->
    <!--<div class="dataItem wow bounceIn" data-wow-duration="1000ms" data-wow-delay="100ms">-->
        <!--<span>3000<i class="r-up">+</i> <i class="r-down">正规医院</i></span>-->
    <!--</div>-->
</div>
<!--数据部分-->
<!--合作医院-->
<div class="hospital" style="background:url('<%= linkPath %>/images/hospital-bg.jpg') top center no-repeat;background-size:cover;">
    <div class="container">
        <div class="row newsTitle">
            <h3 style="color:#fff;">合作医院</h3>
            <div class="title-shadow" style="color:#eee;">COOPERATIVE HOSPITAL</div>
            <a href="/mechanism">
                <span style="background-size:cover;background:url('<%= linkPath %>/images/more-h.png')";></span>
            </a>
        </div>
        <div class="row hospital-list">
            <div class="hospital-item">
                <div class="col-sm-3 col-xs-6 imgBox">
                    <img img-responsive src="<%= linkPath %>/images/doctor1.jpg" alt="">
                </div>
                <div class="col-sm-3 col-xs-6 infoBox" data-idx="17">
                    <p class="text-center place">莫斯科</p>
                    <h3 class="text-center name">NOVA诊所</h3>
                    <p class="text-center brief">Nova医院拥有多台国际先进设备，Nova医院的专家会借助可靠先进的仪器和设备以及丰富的治疗经验为患者...</p>
                    <p class="text-center more">
                        <a class="hvr-bounce-to-right">了解更多 &rarr;</a>
                    </p>
                </div>
            </div>
            <div class="hospital-item hidden-xs">
                <div class="col-sm-3 col-xs-6 imgBox">
                    <img img-responsive src="<%= linkPath %>/images/doctor2.jpg" alt="">
                </div>
                <div class="col-sm-3 col-xs-6 infoBox" data-idx="32">
                    <p class="text-center place">圣地亚哥总部</p>
                    <h3 class="text-center name">RSMC生育科学医学中心</h3>
                    <p class="text-center brief">SMC生育科学医学中心是一家业界领先的试管婴儿医疗集团。总部坐落在南加州美丽温暖的圣地亚哥，在洛杉矶...</p>
                    <p class="text-center more">
                        <a class="hvr-bounce-to-right">了解更多 &rarr;</a>
                    </p>
                </div>
            </div>
            <div class="hospital-item visible-xs">
                <div class="col-sm-3 col-xs-6 infoBox" data-idx="32">
                    <p class="text-center place">圣地亚哥总部</p>
                    <h3 class="text-center name">RSMC生育科学医学中心</h3>
                    <p class="text-center brief">SMC生育科学医学中心是一家业界领先的试管婴儿医疗集团。总部坐落在南加州美丽温暖的圣地亚哥，在洛杉矶...</p>
                    <p class="text-center more">
                        <a class="hvr-bounce-to-right">了解更多 &rarr;</a>
                    </p>
                </div>
                <div class="col-sm-3 col-xs-6 imgBox">
                    <img img-responsive src="<%= linkPath %>/images/doctor2.jpg" alt="">
                </div>
            </div>
        </div>
        <div class="row hospital-list">
            <div class="hospital-item hidden-xs">
                <div class="col-sm-3 col-xs-6 infoBox" data-idx="23">
                    <p class="text-center place">美国</p>
                    <h3 class="text-center name">HRC</h3>
                    <p class="text-center brief">美国梦美HRC生殖医疗集团于1988年成立初期建造了世界最先进的胚胎实验室，在这里完成了第一个通过PGD学...</p>
                    <p class="text-center more">
                        <a class="hvr-bounce-to-right">了解更多 &rarr;</a>
                    </p>
                </div>
                <div class="col-sm-3 col-xs-6 imgBox">
                    <img img-responsive src="<%= linkPath %>/images/doctor3.jpg" alt="">
                </div>
            </div>
            <div class="hospital-item visible-xs">
                <div class="col-sm-3 col-xs-6 imgBox">
                    <img img-responsive src="<%= linkPath %>/images/doctor3.jpg" alt="">
                </div>
                <div class="col-sm-3 col-xs-6 infoBox" data-idx="23">
                    <p class="text-center place">美国</p>
                    <h3 class="text-center name">HRC</h3>
                    <p class="text-center brief">美国梦美HRC生殖医疗集团于1988年成立初期建造了世界最先进的胚胎实验室，在这里完成了第一个通过PGD学...</p>
                    <p class="text-center more">
                        <a class="hvr-bounce-to-right">了解更多 &rarr;</a>
                    </p>
                </div>
            </div>
            <div class="hospital-item">
                <div class="col-sm-3 col-xs-6 infoBox" data-idx="35">
                    <p class="text-center place">泰国</p>
                    <h3 class="text-center name">泰国曼谷医院</h3>
                    <p class="text-center brief">泰国曼谷医院生殖中心坐落在综合医院三楼，院内拥有优雅温馨的就医环境。为了保证患者的隐私，试管婴儿中心...</p>
                    <p class="text-center more">
                        <a class="hvr-bounce-to-right">了解更多 &rarr;</a>
                    </p>
                </div>
                <div class="col-sm-3 col-xs-6 imgBox">
                    <img img-responsive src="<%= linkPath %>/images/doctor4.jpg" alt="">
                </div>
            </div>
        </div>
    </div>
</div>
<!--合作医院-->
<!--案例介绍-->
<div class="example">
    <div class="container">
        <div class="row newsTitle">
            <h3>案例介绍</h3>
            <div class="title-shadow">SERVICE CHARGE</div>
            <a href="/example">
                <span style="cursor: pointer;background:url('<%= linkPath %>/images/more.png')"></span>
            </a>
        </div>
        <div class="row">
            <div class="col-xs-4 paginationBox detailBox" data-exp="0">
                <div style="position: relative;z-index: 50;">
                    <div class="spanBox">
                        <span class="paginationSpan active"></span>
                    </div>
                    <div class="spanBox">
                        <span class="paginationSpan" ></span>
                    </div>
                    <div class="spanBox">
                        <span class="paginationSpan" ></span>
                    </div>
                    <div class="spanBox" style="margin:0 1%;">
                        <span class="paginationSpan"></span>
                    </div>
                </div>
                <span class="index-number">01</span>
                <h2 class="title">卵巢功能衰退 国内四次失败 泰国试管一次圆梦</h2>
                <p class="exampleText">李女士和老公在别人的眼里就是成功人士，人生赢家，但李女士自知心里苦，曾经为了工作耽误了要孩子的最佳时期，等到想要备孕的时候却发现为...</p>
                <div class="arrBox"> &rarr;</div>
            </div>
            <div class="col-xs-8" style="padding:15px 25px;">
                <div class="example-swiper example-swiper-container swiper-container">
                    <div class="swiper-wrapper">
                        <div class="swiper-slide">
                            <img style="width: 100%" src="<%= linkPath %>/images/example/example1.jpg" alt="">
                        </div>
                        <div class="swiper-slide">
                            <img class="swiper-lazy" style="width: 100%" data-src="<%= linkPath %>/images/example/example2.jpg" alt="">
                        </div>
                        <div class="swiper-slide">
                            <img class="swiper-lazy" style="width: 100%" data-src="<%= linkPath %>/images/example/example3.jpg" alt="">
                        </div>
                        <div class="swiper-slide">
                            <img class="swiper-lazy" style="width: 100%" data-src="<%= linkPath %>/images/example/example4.jpg" alt="">
                        </div>
                    </div>
                    <!-- Add Pagination -->
                    <!--<div class="example-swiper-pagination swiper-pagination"></div>-->
                </div>
            </div>
        </div>
    </div>
</div>
<!--案例介绍-->
<!--新闻资讯-->
<div class="container news" style="margin-bottom: 10px;">
    <div class="row newsTitle">
        <h3>新闻资讯</h3>
        <div class="title-shadow">NEWS GROUP</div>
        <a href="/news">
            <span style="cursor: pointer;background:url('<%= linkPath %>/images/more.png')"></span>
        </a>
    </div>
    <div class="row" id="newsBox">
        <!--<div class="col-sm-6 col-xs-12 newsBox">-->
            <!--<div class="col-xs-7 newsText">-->
                <!--<div class="col-xs-12 date"><span class="month">04-26</span>&nbsp;&nbsp;&nbsp;&nbsp;2018</div>-->
                <!--<div class="col-xs-12"><h3>第一位试管婴儿的成长</h3></div>-->
                <!--<div class="col-xs-12"><p class="mainText">从事生殖医学27年，曾在澳大利亚留学2年.多次赴欧美国家进行学术交流。擅长男性不育、无精...</p></div>-->
                <!--<div class="col-xs-12 arrBox"> &rarr;</div>-->
            <!--</div>-->
            <!--<div class="col-xs-5 newsPic">-->
                <!--<img style="width: 100%" src="<%= linkPath %>/images/news1.jpg" alt="">-->
            <!--</div>-->
        <!--</div>-->

    </div>
</div>
<!--新闻资讯-->

<!--跳转到关于我们-->
<div class="container-fluid footerBox">
    <div class="row">
        <div class="col-xs-6 imgBox hidden-xs">
            <img src="<%= linkPath %>/images/footer.jpg" alt="">
        </div>
        <div class="col-xs-12 col-sm-6 textBox">
            <p>关于我们</p>
            <h3>孕育是一场奇妙的旅程</h3>
            <div class="codeBox">
                <div class="follow">
                    <p>&rarr;</p>
                </div>
            </div>
        </div>
    </div>
</div>
<!--跳转到关于我们-->
<script>

    $('.servicer-o').on("mouseenter",function(){
        $(this).css('background','#3BC1B0')
    });
    $('.servicer-o').on("mouseleave",function(){
        $(this).css('background',"url('<%= linkPath %>/images/service_objct.jpg') top center no-repeat");
        $(this).css('background-size',"cover");
    });
    $('.servicer-process').on("mouseenter",function(){
        $(this).css('background','#3BC1B0')
    });
    $('.servicer-process').on("mouseleave",function(){
        $(this).css('background',"url('<%= linkPath %>/images/service1.jpg') top center no-repeat");
        $(this).css('background-size',"cover");
    });
    $(document).on("click",".servicer-o",function () {
        window.location.href = '/consumers';
    });
    $(document).on("click",".servicer-process",function () {
        window.location.href = '/process';
    });
    $(document).on("click",".footerBox .textBox",function () {
        window.location.href = '/about';
    });


    $('.newsTitle span').on("mouseenter",function(){
        $(this).css('background',"url('<%= linkPath %>/images/more-hover.png')")
    });
    $('.newsTitle span').on("mouseleave",function(){
        $(this).css('background',"url('<%= linkPath %>/images/more.png')");
    });

    // 点击更多
    $(document).on("click",".hospital .newsTitle span",function () {
        window.location.href = '/mechanism';
    });
    $(document).on("click",".example .newsTitle span",function () {
        window.location.href = '/example';
    });
    $(document).on("click",".news .newsTitle span",function () {
        window.location.href = '/news';
    });

    var ps = 6;  //pagesize
    var cp = 1; //当前页

    var getAllNewsStr = function (list) {
        var str = '';
        list.forEach(function (v) {
            str += getNewsStr(v);
        })
        return str;
    }

    var getNewsStr = function (item) {
        return '<a class="col-sm-6 col-xs-12" href="'+ item.linkedUrl +'" target="_blank">' +
            '<div class=" newsBox">\n' +
            '<div class="new-item" style="display: inline-block;width:100%;height: 100%;padding:10px;cursor: pointer;">' +
            '            <div class="col-xs-7 newsText">\n' +
            '                <div class="col-xs-12 date"><span class="month">'+ item.releaseDate +'</span>&nbsp;&nbsp;&nbsp;&nbsp;'+ item.releaseYear +'</div>\n' +
            '                <div class="col-xs-12"><h3>'+ item.newsTitle +'</h3></div>\n' +
            '                <div class="col-xs-12"><p class="mainText">'+ item.newsDetailed +'</p></div>\n' +
            '                <div class="col-xs-12 arrBox"> &rarr;</div>\n' +
            '            </div>\n' +
            '            <div class="col-xs-5 newsPic">\n' +
            '                <img style="width: 100%" src="'+ item.imgUrl +'" alt="">\n' +
            // '                <img style="width: 100%" src="<%= linkPath %>/images/news1.jpg" alt="">\n' +
            '            </div>\n' +
            '</div>\n'+
            '        </div>'
            '</a>'
    }
    $.post(goBaseUrl + '/songbao/v1/news',JSON.stringify({pageSize:ps,currentPage:cp}),function (data) {
        if(data.Code == '200' && !!data.Data){
            var data = data.Data;
            if(!!data.newsList){
                var list = data.newsList ;
                $("#newsBox").html(getAllNewsStr(list));
            }
        }
    },'json')

    //首页轮播
    var hText = ['全球定制方案', '试管保险', '金融分期', '试管成功率测试'];
    var pText = ['试管婴儿全球解决方案', '助孕保险套餐，助您好孕', '助您早日圆家庭梦', '一分钟预测IVF的成功率'];
    var imgSrc=['<%= linkPath %>/images/global.png','<%= linkPath %>/images/cuvette.png','<%= linkPath %>/images/money.png','<%= linkPath %>/images/test.png']
    var imgSrcHover=['<%= linkPath %>/images/global_hover.png','<%= linkPath %>/images/cuvette_hover.png','<%= linkPath %>/images/money_hover.png','<%= linkPath %>/images/test_hover.png']
    var swiper = new Swiper('.banner-swiper-container', {
        pagination: {
            el: '.banner-swiper-pagination',
            clickable: true,
            renderBullet: function (index, className) {
                return '<div class="swiper-pagination-customs ' + className +
                    '"><div class="banner-left hidden-xs"><img style="width:100%;height:100%;" src="'+imgSrc[index]+'" alt=""></div><div class="banner-right">' +
                    '<h6 class="banner-title">'+ hText[index] +'</h6>' +
                    '<p class="banner-p hidden-xs" style="font-size:12px;line-height: 12px;color:#ccc;">'+ pText[index] +'</p></div></div>';
            },
        },
        loop:false,
        // autoplay:false,
        autoplay:{
            delay:5000,
            //如果设置为false，用户操作swiper之后自动切换不会停止，每次都会重新启动autoplay
            disableOnInteraction:false
        },
        on:{
            slideChange:function () {
                var $thisIndex =  this.activeIndex ;
                $('.banner-swiper .swiper-pagination-customs').find('img').each(function (i,v) {
                    $(v).attr('src',imgSrc[i])
                })
                $('.banner-swiper .swiper-pagination-customs').eq($thisIndex).find('img').attr('src',imgSrcHover[$thisIndex])
            }
        },
        lazy: {
            loadPrevNext: false,
        }
    });
    var firstIndex =  $('.swiper-pagination-bullet-active').index();
    $('.swiper-pagination-bullet-active img').attr('src',imgSrcHover[firstIndex])
</script>
